package cate.game.pay;

import cate.common.table.pay.PayItemRow;
import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.role.Role;
import cp.solution.business.pay.PayRecordEntity;
import cp.solution.business.pay.dto.PayDeliverResult;

/** 支付回调 */
public abstract class PayCallback {

    /** 当支付成功时 */
    public abstract void onSuccess(GameBody game, Role role, PayRecordEntity record, PayDeliverResult result);

    /** 当支付失败时 */
    public abstract void onFail(GameBody game, Role role, PayRecordEntity record, PayDeliverResult result);

    public GameResult<Void> allowPay(Role role, PayItemRow pir) {
        return new GameResult<Void>().fail("不支持的方法");
    }
}
